package com.bootdo.appsystem.domain;

import java.io.Serializable;
import java.util.Date;



/**
 * 
 * 
 * @author xiaoxiao
 * @email 806191255@qq.com
 * @date 2018-05-12 14:42:14
 */
public class ShouruDO implements Serializable {
	private static final long serialVersionUID = 1L;
	
	//收入ID
	private Integer id;
	//收入理由
	private String resource;
	//收入时间
	private Date srdate;
	//收入金额
	private Double srMoney;
	//用户ID
	private Integer uid;
	//订单号
	private String ddcode;
	//收入类型
	private String type;
	//收入类型编号
	private Integer shourucode;

	/**
	 * 设置：收入ID
	 */
	public void setId(Integer id) {
		this.id = id;
	}
	/**
	 * 获取：收入ID
	 */
	public Integer getId() {
		return id;
	}
	/**
	 * 设置：收入理由
	 */
	public void setResource(String resource) {
		this.resource = resource;
	}
	/**
	 * 获取：收入理由
	 */
	public String getResource() {
		return resource;
	}
	/**
	 * 设置：收入时间
	 */
	public void setSrdate(Date srdate) {
		this.srdate = srdate;
	}
	/**
	 * 获取：收入时间
	 */
	public Date getSrdate() {
		return srdate;
	}
	/**
	 * 设置：收入金额
	 */
	public void setSrMoney(Double srMoney) {
		this.srMoney = srMoney;
	}
	/**
	 * 获取：收入金额
	 */
	public Double getSrMoney() {
		return srMoney;
	}
	/**
	 * 设置：用户ID
	 */
	public void setUid(Integer uid) {
		this.uid = uid;
	}
	/**
	 * 获取：用户ID
	 */
	public Integer getUid() {
		return uid;
	}
	/**
	 * 设置：订单号
	 */
	public void setDdcode(String ddcode) {
		this.ddcode = ddcode;
	}
	/**
	 * 获取：订单号
	 */
	public String getDdcode() {
		return ddcode;
	}
	/**
	 * 设置：收入类型
	 *
	 * 包括
	 * 1、推广奖励
	 * 2、本金收入
	 * 3、总监提成
	 * 4、代理收入
	 * 5、红包奖励
	 *
	 * 7、其他收入
	 *
	 */
	public void setType(String type) {
		this.type = type;
	}
	/**
	 * 获取：收入类型
	 */
	public String getType() {
		return type;
	}
	/**
	 * 设置：收入类型编号
	 *
	 * 1、商家本金
	 * 2、用户上级奖励 、 商家上级奖励
	 * 3、区域代理
	 * 5、用户红包
	 * 6、商家红包
	 *
	 * 7、其他收入
	 * 9、股东收入
	 *
	 */
	public void setShourucode(Integer shourucode) {
		this.shourucode = shourucode;
	}
	/**
	 * 获取：收入类型编号
	 */
	public Integer getShourucode() {
		return shourucode;
	}




	/**
	*【@author】  @fan
	*【方法解释】 用户上级奖励收入
	*【参数】
	*@Param  [ordercode, money, i, uid]
	*@return  com.bootdo.appsystem.domain.ShouruDO      
	*【@date】    2018/6/7 0007  下午 15:34
	*/
	public ShouruDO userPatentShouru(String ordercode , Double money , int i , Integer uid){
		return this.patentShouru(ordercode,money,i,uid,"会员");
	}

	/**
	 *【@author】  @fan
	 *【方法解释】 商家上级奖励收入
	 *【参数】
	 *@Param  [ordercode, money, i, uid]
	 *@return  com.bootdo.appsystem.domain.ShouruDO
	 *【@date】    2018/6/7 0007  下午 15:34
	 */
	public ShouruDO sellerPatentShouru(String ordercode , Double money , int i , Integer uid){
		return this.patentShouru(ordercode,money,i,uid,"商家");
	}

	/*
	*【@author】  @fan
	*【方法解释】 区域代理收入
	*【参数】
	*@Param  [ordercode, money]
	*@return  com.bootdo.appsystem.domain.ShouruDO      
	*【@date】    2018/6/8 0008  上午 10:26
	*/
	public ShouruDO dailiShouru(Integer uid , String ordercode , Double money ){
		ShouruDO shouruDO = new ShouruDO();
		shouruDO.setDdcode(ordercode);
		shouruDO.setSrdate(new Date());
		shouruDO.setSrMoney(money);
		shouruDO.setResource("区域代理");
		shouruDO.setShourucode(3);
		shouruDO.setType("代理收入");
		shouruDO.setUid(uid);
		return  shouruDO;
	}

	/*
	*【@author】  @fan
	*【方法解释】 本金收入
	*【参数】
	*@Param  [ordercode, money]
	*@return  com.bootdo.appsystem.domain.ShouruDO
	*【@date】    2018/6/8 0008  上午 10:26
	*/
	public ShouruDO benjinShouru(Integer uid , String ordercode , Double money ){
		ShouruDO shouruDO = new ShouruDO();
		shouruDO.setDdcode(ordercode);
		shouruDO.setSrdate(new Date());
		shouruDO.setSrMoney(money);
		shouruDO.setResource("商家本金");
		shouruDO.setShourucode(1);
		shouruDO.setType("商家本金");
		shouruDO.setUid(uid);
		return  shouruDO;
	}

	/**
	*【@author】  @fan
	*【方法解释】股东收入
	*【参数】
	*@Param  [uid, ordercode, money, resun]
	*@return  com.bootdo.appsystem.domain.ShouruDO      
	*【@date】    2018/6/8 0008  下午 16:22
	*/
	public ShouruDO gudongShouru(Integer uid , String ordercode , Double money , String resun){
		ShouruDO shouruDO = new ShouruDO();
		shouruDO.setDdcode(ordercode);
		shouruDO.setSrdate(new Date());
		shouruDO.setSrMoney(money);
		shouruDO.setResource(resun);
		shouruDO.setShourucode(9);
		shouruDO.setType(resun);
		shouruDO.setUid(uid);
		return  shouruDO;
	}

	/**
	 *【@author】  @fan
	 *【方法解释】提现申请
	 *【参数】
	 *@Param  [uid, ordercode, money, resun]
	 *@return  com.bootdo.appsystem.domain.ShouruDO
	 *【@date】    2018/6/8 0008  下午 16:22
	 */
	public ShouruDO tixianShouru(Integer uid , Double money){
		ShouruDO shouruDO = new ShouruDO();
		shouruDO.setDdcode("10006");
		shouruDO.setSrdate(new Date());
		shouruDO.setSrMoney(money);
		shouruDO.setResource("提现申请");
		shouruDO.setShourucode(9);
		shouruDO.setType("提现申请");
		shouruDO.setUid(uid);
		return  shouruDO;
	}


	/**
	 *【@author】  @fan
	 *【方法解释】提现申请
	 *【参数】
	 *@Param  [uid, ordercode, money, resun]
	 *@return  com.bootdo.appsystem.domain.ShouruDO
	 *【@date】    2018/6/8 0008  下午 16:22
	 */
	public ShouruDO notTixianShouru(Integer uid , Double money){
		ShouruDO shouruDO = new ShouruDO();
		shouruDO.setDdcode("10008");
		shouruDO.setSrdate(new Date());
		shouruDO.setSrMoney(money);
		shouruDO.setResource("申请不通过");
		shouruDO.setShourucode(9);
		shouruDO.setType("提现申请");
		shouruDO.setUid(uid);
		return  shouruDO;
	}




	private ShouruDO patentShouru(String ordercode , Double money , int i , Integer uid , String s){
		ShouruDO shouruDO = new ShouruDO();
		shouruDO.setDdcode(ordercode);
		shouruDO.setSrdate(new Date());
		shouruDO.setSrMoney(money);
		shouruDO.setResource(s + "上" + (i) + "级奖励");
		shouruDO.setShourucode(2);
		shouruDO.setType("推广奖励");
		shouruDO.setUid(uid);
		return  shouruDO;
	}

	/*
	*【@author】  @fan
	*【方法解释】 用户红包
	*【参数】
	*@Param
	*@return        
	*【@date】    2018/6/11 0011  上午 0:26
	*/
	public ShouruDO userHongBaoAdd(OrderhongbaoDO orderhongbaoDO , Double money){
		return this.hongBaoAdd(orderhongbaoDO,money,"用户红包",5);
	}

	/**
	*【@author】  @fan
	*【方法解释】 商家红包
	*【参数】
	*@Param  [orderhongbaoDO, money]
	*@return  com.bootdo.appsystem.domain.ShouruDO      
	*【@date】    2018/6/11 0011  上午 0:27
	*/
	public ShouruDO sellerHongBaoAdd(OrderhongbaoDO orderhongbaoDO , Double money){
		return this.hongBaoAdd(orderhongbaoDO,money,"商家红包",6);
	}


	private ShouruDO hongBaoAdd(OrderhongbaoDO orderhongbaoDO, Double money , String yonghu , Integer i){
		ShouruDO shouruDO = new ShouruDO();
		shouruDO.setDdcode(orderhongbaoDO.getDdcode());
		shouruDO.setSrdate(new Date());
		shouruDO.setSrMoney(money);
		shouruDO.setResource(yonghu);
		shouruDO.setShourucode(i);
		shouruDO.setType("红包奖励");
		return  shouruDO;
	}





}
